#ifndef COMMON_H
#define COMMON_H

#include <defs/export.h>
#include <defs/global.h>
#include <logger/logger.h>

#include <QtGui>

namespace Opl{

    /**
      * Gui components for graphic and operations and user interface
      */
    namespace Gui {

        /**
          * Common Gui components
          */
        namespace Common{

            /**
              * Create Matrix4x4 for rotation params;
              */
            QMatrix4x4 fromRotation(float angle, Qt::Axis axis);
            QMatrix4x4 fromProjection(float fovAngle);

            /**
              * Create Transformation for angle
              */
            QTransform rotatingTransform(qreal angle);    

        };

#define LI  Opl::Core::LoggerItem()
#define LID LI.Debug()     << "[GUI]:"
#define LII LI.Info()      << "[GUI]:"
#define LIE LI.Error()     << "[GUI]:"
#define LIT LI.Trace()     << "[GUI]:"
#define LIW LI.Warning()   << "[GUI]:"

    };
};

#endif // COMMON_H
